home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1999 Spring / macformat-077.iso / Shareware Plus / Development / Akua Sweets 131 / Akua Sweets Examples / Imaging / Diamonds are Forever < prev    next >
Encoding:
Text File  |  1999-03-04  |  1.0 KB  |  33 lines  |  [TEXT/ToyS]

  1. set dW to display drawing titled "Test" with dimensions {300, 150}
  2.  
  3. draw a box into dW ¬
  4.     inside of {0, 0, 300, 150} ¬
  5.     filling it with the pen ¬
  6.     using state {fg color:"994422"}
  7.  
  8. draw a polygon into dW ¬
  9.     using data {{150, 0}, {300, 75}, {150, 150}, {0, 75}} ¬
  10.     filling it with the pen ¬
  11.     using state {fg color:"224499"}
  12.  
  13. draw a polygon into dW ¬
  14.     using data {{75, 25}, {225, 50}, {75, 75}, {75, 50}} ¬
  15.     filling it with the pen ¬
  16.     using state {fg color:"229922"}
  17.  
  18. set diamond to capture picture from dW
  19.  
  20. store image diamond in (((path to desktop folder) as string) & "Test Diamond")
  21. set the icon of (((path to desktop folder) as string) & "Test Diamond") to diamond
  22.  
  23. set diamond to rotate image diamond by 450 -- Rotate 45 degrees
  24. display drawing dW with disposal
  25. set dW to display drawing titled "Rotated" starting with diamond
  26.  
  27. pause for 60
  28.  
  29. save clipping diamond in (((path to desktop folder) as string) & "Test Diamond II")
  30. set the icon of (((path to desktop folder) as string) & "Test Diamond II") to diamond
  31.  
  32. display drawing dW with disposal
  33.